home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / ada / gwuada_5.zip / adaed / nyudemos / diners.doc < prev    next >
Text File  |  1992-09-01  |  4KB  |  99 lines

  1.  
  2. Portable Dining Philosophers
  3.  
  4. Michael B. Feldman
  5. Dept. of Electrical Engineering and Computer Science
  6. The George Washington University
  7. Washington, DC 20052
  8.  
  9. (202) 994-5253
  10. mfeldman@seas.gwu.edu
  11.  
  12. copyright 1991, Michael B. Feldman
  13. These programs may be freely copied, distributed, and modified 
  14. for educational purposes but not for profit. If you modify or enhance 
  15. the program (for example, to use other display systems), please send
  16. me a copy of the modified code, either on diskette or by e-mail.
  17.  
  18. This system is an elaborate implementation of Edsger Dijkstra's
  19. famous Dining Philosophers, a classical demonstration of deadlock
  20. problems in concurrent programming.
  21.  
  22. This distribution consists of four files in addition to the one you
  23. are reading.
  24.  
  25. File 2 is the line-by-line version of Diners, with all the compilation
  26. units concatenated into a single ASCII file, using Richard Conn's
  27. Pager2 program (see below). All the units are in the correct compilation
  28. order, so a single command to your Ada compiler will compile the system
  29. correctly. You need only to compile it, link the main program (diners),
  30. and enjoy the action.
  31.  
  32. The following units are included in this file:
  33.  
  34.  io_libs.ada -- 10 Lines
  35.  random.ads -- 17 Lines
  36.  chop.ads -- 8 Lines
  37.  phil.ads -- 14 Lines
  38.  room.ads -- 17 Lines
  39.  diners.ada -- 9 Lines
  40.  random.adb -- 67 Lines
  41.  chop.adb -- 18 Lines
  42.  phil.adb -- 50 Lines
  43.  roomline.adb -- 84 Lines
  44.  
  45. File 3 contains the necessary units to build the simple window version of
  46. Diners. Compile it, re-link the main program, and have fun watching it.
  47. The file contains the following units:
  48.  
  49.  screen.ads -- 15 Lines
  50.  windows.ads -- 75 Lines
  51.  screen.adb -- 30 Lines
  52.  windows.adb -- 201 Lines
  53.  roomwind.adb -- 102 Lines
  54.  
  55. File 4 contains the Ada sources for Richard Conn's Pager2 system, which
  56. was used to collect the Ada units from the Diners system. You can compile
  57. and link this too, if you wish, to form a general-purpose pager program.
  58. The file contains:
  59.  
  60.  cli.ads -- 77 Lines
  61.  cli.adb -- 219 Lines
  62.  pager2.ada -- 1289 Lines
  63.  
  64. File 5 contains the documentation for Pager2; it's a straight ASCII file.
  65.  
  66. If you wish to modify any of the compilation units, you can separate
  67. them with an editor, or un-page them using Pager2.
  68.  
  69. The Ada units follow the following naming convention:
  70.  
  71. .ADS files are package specifications
  72. .ADB files are package bodies
  73. .ADA files are main procedures or I/O instantiations
  74.  
  75. The packages Screen, Windows, and Random are reusable packages, and
  76. existed before this project was undertaken.
  77.  
  78. The simple terminal package Screen gives a few screen-handling commands.
  79. To run the windowing version on an MS-DOS machine, be sure that the
  80. ANSI.SYS driver is given in your CONFIG.SYS. For machines like IBM
  81. mainframes and Macintosh microcomputers, you will need to use the line-
  82. oriented version, as these computers do not usually have ANSI 
  83. terminal drivers. 
  84.  
  85. This program has been compiled and executed successfully under more than 
  86. 30 representatives of most of the major Ada compiler families, including
  87. those from Alsys, DEC, Irvine, Meridian, Rational, RR, TeleSoft, and
  88. Verdix, on machines from the Apple Macintosh and MS-DOS families to
  89. IBM and Cray mainframes, and most major workstation families. Diners
  90. has also been tested using the freely-available AdaEd system from New 
  91. York University under DOS and Ultrix.
  92.  
  93. Please let me know of any tests (successful or not) with other compilers.
  94. I believe that this program is a very useful demonstration of the
  95. portability of Ada packages and tasking, and would like to know of
  96. evidence confirming or refuting this belief! Enjoy!
  97.  
  98. Mike Feldman
  99.